package com.cloud.code.牛客网;

import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeSet;

public class Test32 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String nStr = in.nextLine();
        String[] nums = in.nextLine().split(" ");
        in.close();

        TreeSet<Integer> ints = new TreeSet<>();
        for (String num : nums) {
            ints.add(Integer.parseInt(num));
        }

        if (ints.contains(1)) {
            System.out.println(1);
            ints.remove(1);
            return;
        }

        ArrayList<Integer> intList = new ArrayList<>(ints);
        for (int i = 0; i < intList.size(); i++) {
            Integer cur = intList.get(i);
            for (int j = i + 1; j < intList.size(); ) {
                if (intList.get(j) % cur == 0) {
                    intList.remove(j);
                } else j++;
            }
        }
        System.out.println(intList.size());
    }
}
